package com.station.server.rpc;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.station.client.rpc.RPCInterface;
import com.station.server.entity.*;
import com.station.client.proxies.*;

import java.text.DateFormat;
import java.util.Date;

public class RPCImpl extends RemoteServiceServlet implements RPCInterface
{
	private static final long serialVersionUID = 1L;

	public String testRPC(PStation pStation)
	{
        Station station = Station.tranform(pStation);
		Date now = new Date();
		String dtm = DateFormat.getTimeInstance(DateFormat.MEDIUM).format(now);
		return "Station is successfully added with id " + station.id;
	}
}
